<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>

<%-- Add portlet taglibs to jsp --%>
<%@ page import="javax.portlet.*"%>
<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt"%>

<portlet:defineObjects />
<b>
    This is the view page of MVC Sample
</b>
<%-- @Deprecated --%>
<%--
<script type="text/javascript" src='<%= renderRequest.getContextPath() + "/scripts/common.js" %>' ></script>
--%>
<%-- Using contextPath from request --%>
<script type="text/javascript" src='/${requestScope.contextPath}/scripts/common.js' ></script>

<form name="<portlet:namespace/>list" action="<portlet:actionURL/>" method="POST">
<input type="hidden" name="screenId" value="List"/>
<input type="hidden" name="eventId" value="default"/>

<table width="100%">
<tr>
    <td align="right">
        <input type="button" name="goAdd" value="Home" onclick='submitAction("<portlet:namespace/>","list","goAdd");'/>
    </td>
</tr>
</table>
    <p><input type="text" name="T1" size="20"><input type="checkbox" name="advSearchChk" value="ON" onchange='submitAction("<portlet:namespace/>","list","goAdvanced");'>Advanced 
    search<br>
    <input type="submit" value="Search" name="B1"></p>
    <table border="0" width="48%" id="table1" cellspacing="0" cellpadding="0">
        <tr>
            <td>
            <p align="right"><input type="submit" value="Export2Excel" name="B1"></td>
        </tr>
    </table>
    <table border="1" width="48%" id="table1" cellspacing="0" cellpadding="0">
        <tr>
            <td width="28" bgcolor="#6699FF">No</td>
            <td width="156" bgcolor="#6699FF">Column1</td>
            <td width="182" bgcolor="#6699FF">Column2</td>
            <td bgcolor="#6699FF">Column3</td>
        </tr>
        <c:forEach var="user" items="${requestScope.USERS}">
         <tr>
            <td width="28">
            <p align="right"></td>
            <td width="156">${user.username}</td>
            <td width="182">${user.birthday}</td>
            <td></td>
         </tr>
        </c:forEach>
    </table>
    <table border="0" width="48%" id="table1" cellspacing="0" cellpadding="0">
        <tr>
            <td>
            <p align="right"><input type="submit" value="Export2Excel" name="B1"></td>
        </tr>
    </table>
</form>
